package com.hj.homework;

public class Test2 {
    public static void main(String[] args) {
        Rectangle r = new Rectangle();
        r.setLength(2);
        r.setWidth(1);
        System.out.println("长：" + r.getLength());
        System.out.println("宽：" + r.getWidth());
        System.out.println("面积：" + r.getArea());
        System.out.println("周长：" + r.getPerimeter());

        r.setLength(r.getLength()*2);
        r.setWidth(r.getWidth()*2);
        System.out.println(r.getInfo());
    }
}
